﻿Namespace("sketch.ui.common");

(function () {
    var common = sketch.ui.common,
        fwk = sketch.framework;

    var normalBrush = new fwk.Brush.create("rgba(204, 255, 102, 0.5)");
    var hoverBrush = new fwk.Brush.create("rgba(255, 230, 102, 0.5)");

    common.DockPannel = klass(fwk.Container, {
        _constructor:function(){
            this._brush = normalBrush;
        },
        dragging : function(event){
            this._brush = hoverBrush;
        },
        stopDragging : function(event){
            this._brush = normalBrush;
        },
        drawSelf : function(context){
            var that = this;
//            this._brush.apply(context, function(context){
//                context.fillRect(that.left(), that.top(), that.width(), that.height());
//            });

            common.DockPannel.Super.drawSelf.call(this, context);
        },
        canAccept:function(element){
            return true;
        }
    });
})();